//
//  MyRefoundOneTableViewCell.m
//  lmq
//
//  Created by 马田成 on 2017/3/20.
//  Copyright © 2017年 yuanxin. All rights reserved.
//

#import "MyRefoundOneTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "MyRefoundOneModel.h"

@implementation MyRefoundOneTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.successLabel.layer.borderColor = [UIColor redColor].CGColor;
    self.successLabel.layer.borderWidth = 1.0f;
    
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModelRefound:(MyRefoundOneModel *)modelRefound{

    NSString *strTotal = [NSString stringWithFormat:@"%ld", (long)modelRefound.total];
    
    self.totalLabel.text = strTotal;
    self.nameLabel.text = modelRefound.shop_name;
    NSString *strPrice = [NSString stringWithFormat:@"%ld", (long)modelRefound.price];
    
    self.priceLabel.text = strPrice;
    self.orderNumLabel.text = modelRefound.order_num;
    NSString *str1 = @"×";
    self.numLabel.text = [str1 stringByAppendingString:modelRefound.return_quantity];
    NSString *strStatus = [NSString stringWithFormat:@"%ld", (long)modelRefound.status];
    
    if ([strStatus isEqualToString:@"-2"]) {
        self.successLabel.text = @"审核中";
    }else if ([strStatus isEqualToString:@"-3"]) {
    
        self.successLabel.text = @"退货失败";
    }else if ([strStatus isEqualToString:@"1"]) {
    
        self.successLabel.text = @"退货成功";
        
    }
//    NSString *strPic = @"http://lmq.quyum.cn/";
//    
//    NSString *str = [strPic stringByAppendingString:modelRefound.shoppic];
//    
    NSString *urlWare=modelRefound.shoppic;
    NSString *str=manage(AP_HOST, urlWare);
    NSString *strUrl = [str stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
    
    [self.picLabel sd_setImageWithURL:[NSURL URLWithString:strUrl]];
    

}

@end
